// 全局样式
@import './variables.scss';
@import './reset.scss';

// 移动端适配
html {
  font-size: 16px;
}

@media screen and (max-width: 375px) {
  html {
    font-size: 14px;
  }
}

@media screen and (min-width: 414px) {
  html {
    font-size: 18px;
  }
}

// 通用样式类
.container {
  max-width: 750px;
  margin: 0 auto;
  background-color: #f5f5f5;
  min-height: 100vh;
}

.page {
  padding-bottom: 50px;
}

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

// 文本样式
.text-primary {
  color: $primary-color;
}

.text-secondary {
  color: $secondary-color;
}

.text-muted {
  color: $text-muted;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

// 间距
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.ml-10 { margin-left: 10px; }
.mr-10 { margin-right: 10px; }
.pt-10 { padding-top: 10px; }
.pb-10 { padding-bottom: 10px; }
.pl-10 { padding-left: 10px; }
.pr-10 { padding-right: 10px; }

// 弹性布局
.flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.flex-center {
  justify-content: center;
  align-items: center;
}

.flex-between {
  justify-content: space-between;
}

.flex-around {
  justify-content: space-around;
}

.flex-1 {
  flex: 1;
}

// 图片样式
.img-fluid {
  max-width: 100%;
  height: auto;
}

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

// 卡片样式
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
}

.card-body {
  padding: 15px;
}

// 按钮样式
.btn {
  display: inline-block;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  
  &.btn-primary {
    background-color: $primary-color;
    color: #fff;
    
    &:hover {
      background-color: darken($primary-color, 10%);
    }
  }
  
  &.btn-secondary {
    background-color: $secondary-color;
    color: #fff;
    
    &:hover {
      background-color: darken($secondary-color, 10%);
    }
  }
  
  &.btn-outline {
    background-color: transparent;
    border: 1px solid $primary-color;
    color: $primary-color;
    
    &:hover {
      background-color: $primary-color;
      color: #fff;
    }
  }
} 